// FinanceView.h : interface of the CFinanceView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_FINANCEVIEW_H__486BF6E3_8CC2_4BD8_9543_F6572692DBC8__INCLUDED_)
#define AFX_FINANCEVIEW_H__486BF6E3_8CC2_4BD8_9543_F6572692DBC8__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "financedef.h"	// Added by ClassView

#include "ListEditView.h"
#include "SOURCE\FlatHeaderCtrl.h"	// Added by ClassView


class CFinanceView : public CListEditView
{
protected: // create from serialization only
	CFinanceView();
	DECLARE_DYNCREATE(CFinanceView)

// Attributes
public:
	CFinanceDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CFinanceView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void OnInitialUpdate(); // called first time after construct
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	void RefreshListView();
	virtual ~CFinanceView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	_RecordsetPtr m_pRecordset;
	_RecordsetPtr m_pBankbookset;
	CImageList m_imagelist;
	CBitmap m_bitmap;
	CFlatHeaderCtrl m_FlatHeader;
	
	//{{AFX_MSG(CFinanceView)
	afx_msg void OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnClickList(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDblclkList(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnRclickList(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnKeyDownList(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnRefresh();
	afx_msg void OnAddnew();
	afx_msg void OnModify();
	afx_msg void OnUpdateModify(CCmdUI* pCmdUI);
	afx_msg void OnDeleone();
	afx_msg void OnUpdateDeleone(CCmdUI* pCmdUI);
	afx_msg void OnSetup();
	afx_msg void OnSearch();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	void OpenAccount();
	void ShowAccountRec( LONG lAbsIdx );
	ORDERCOLUMN m_ordercolumn;
	DISPORDER m_disporder;
	INT m_iLstCurSel;
};

#ifndef _DEBUG  // debug version in FinanceView.cpp
inline CFinanceDoc* CFinanceView::GetDocument()
   { return (CFinanceDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_FINANCEVIEW_H__486BF6E3_8CC2_4BD8_9543_F6572692DBC8__INCLUDED_)
